package com.example.doctorserver.controller;


import com.example.doctorserver.pojo.Setmeal;
import com.example.doctorserver.response.ApiRestResponse;
import com.example.doctorserver.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/setmeal")
public class SetmealController {

    @Autowired
    private SetmealService setmealService;

    @PostMapping("/listSetmeal")
    public ApiRestResponse listSetmeal(){

        List<Setmeal> list=setmealService.listSetmeal();
        System.out.println(list);
        return ApiRestResponse.success(list);
    }

}
